projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19222a6
)
gtkentry: Return early from gtk_entry_clear() if no icon info exists
author
Philip Withnall
<philip.withnall@collabora.co.uk>
Wed, 20 Nov 2013 17:30:22 +0000
(17:30 +0000)
committer
Philip Withnall
<philip.withnall@collabora.co.uk>
Mon, 9 Mar 2015 13:41:37 +0000
(13:41 +0000)
This helps scan-build avoid some false positive potential NULL pointer
dereference warnings.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
gtk/gtkentry.c
patch
|
blob
|
history
diff --git
a/gtk/gtkentry.c
b/gtk/gtkentry.c
index d3f2ab58b959a09e6379cd7a1245735dd0e882f7..c0b9d4343fb7242ba6ee5dab1d57380796ffd018 100644
(file)
--- a/
gtk/gtkentry.c
+++ b/
gtk/gtkentry.c
@@
-7437,7
+7437,10
@@
gtk_entry_clear (GtkEntry *entry,
EntryIconInfo *icon_info = priv->icons[icon_pos];
GtkImageType storage_type;
- if (icon_info && _gtk_icon_helper_get_is_empty (icon_info->icon_helper))
+ if (icon_info == NULL)
+ return;
+
+ if (_gtk_icon_helper_get_is_empty (icon_info->icon_helper))
return;
g_object_freeze_notify (G_OBJECT (entry));